<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>Class: PoolController</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
  <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
  <script type="text/javascript">
  // <![CDATA[

  function popupCode( url ) {
    window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
  }

  function toggleCode( id ) {
    if ( document.getElementById )
      elem = document.getElementById( id );
    else if ( document.all )
      elem = eval( "document.all." + id );
    else
      return false;

    elemStyle = elem.style;
    
    if ( elemStyle.display != "block" ) {
      elemStyle.display = "block"
    } else {
      elemStyle.display = "none"
    }

    return true;
  }
  
  // Make codeblocks hidden by default
  document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
  
  // ]]>
  </script>

</head>
<body>



    <div id="classHeader">
        <table class="header-table">
        <tr class="top-aligned-row">
          <td><strong>Class</strong></td>
          <td class="class-name-in-header">PoolController</td>
        </tr>
        <tr class="top-aligned-row">
            <td><strong>In:</strong></td>
            <td>
                <a href="../files/app/controllers/pool_controller_rb.html">
                app/controllers/pool_controller.rb
                </a>
        <br />
            </td>
        </tr>

        <tr class="top-aligned-row">
            <td><strong>Parent:</strong></td>
            <td>
                <a href="ApplicationController.html">
                ApplicationController
               </a>
            </td>
        </tr>
        </table>
    </div>
  <!-- banner header -->

  <div id="bodyContent">



  <div id="contextContent">



   </div>

    <div id="method-list">
      <h3 class="section-bar">Methods</h3>

      <div class="name-list">
      <a href="#M000153">add_desenvolvedor</a>&nbsp;&nbsp;
      <a href="#M000156">aprovarDesenvolvimento</a>&nbsp;&nbsp;
      <a href="#M000155">del_certificador</a>&nbsp;&nbsp;
      <a href="#M000154">del_desenv</a>&nbsp;&nbsp;
      <a href="#M000152">escalarDesenvolvedor</a>&nbsp;&nbsp;
      <a href="#M000148">home</a>&nbsp;&nbsp;
      <a href="#M000146">index</a>&nbsp;&nbsp;
      <a href="#M000151">minhas_req</a>&nbsp;&nbsp;
      <a href="#M000157">reprovarDesenvolvimento</a>&nbsp;&nbsp;
      <a href="#M000149">req_em_desenv</a>&nbsp;&nbsp;
      <a href="#M000147">show</a>&nbsp;&nbsp;
      <a href="#M000150">show_req</a>&nbsp;&nbsp;
      </div>
    </div>

  </div>


    <!-- if includes -->

    <div id="section">





      


    <!-- if method_list -->
    <div id="methods">
      <h3 class="section-bar">Public Instance methods</h3>

      <div id="method-M000153" class="method-detail">
        <a name="M000153"></a>

        <div class="method-heading">
          <a href="#M000153" class="method-signature">
          <span class="method-name">add_desenvolvedor</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000153-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000153-source">
<pre>
    <span class="ruby-comment cmt"># File app/controllers/pool_controller.rb, line 70</span>
70:   <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_desenvolvedor</span>
71:     <span class="ruby-ivar">@requisicao</span> = <span class="ruby-constant">Requisicao</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">params</span>[<span class="ruby-identifier">:requisicao</span>][<span class="ruby-identifier">:req_id</span>])
72:     <span class="ruby-identifier">desenv_existentes</span> = <span class="ruby-ivar">@requisicao</span>.<span class="ruby-identifier">desenvolvedores</span>.<span class="ruby-identifier">collect</span>
73:     <span class="ruby-ivar">@desenv</span> = <span class="ruby-constant">Desenvolvedor</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">params</span>[<span class="ruby-identifier">:desenvolvedor</span>][<span class="ruby-identifier">:id</span>])
74:     <span class="ruby-identifier">aux</span> = <span class="ruby-keyword kw">nil</span>
75:     <span class="ruby-keyword kw">for</span> <span class="ruby-identifier">i</span> <span class="ruby-keyword kw">in</span> <span class="ruby-identifier">$lista_desenv</span> <span class="ruby-comment cmt">#iniciada em requisicoes_controller </span>
76:       <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">i</span> <span class="ruby-operator">==</span> <span class="ruby-ivar">@desenv</span>.<span class="ruby-identifier">id</span>.<span class="ruby-identifier">to_i</span>
77:           <span class="ruby-identifier">aux</span> = <span class="ruby-identifier">i</span>.<span class="ruby-identifier">to_i</span>
78:           <span class="ruby-ivar">@desenv</span> = <span class="ruby-keyword kw">nil</span>
79:           <span class="ruby-identifier">flash</span>[<span class="ruby-identifier">:notice</span>] = <span class="ruby-value str">&quot;Desenvolvedor ja escalado&quot;</span>
80:       <span class="ruby-keyword kw">end</span>
81:     <span class="ruby-keyword kw">end</span>
82:     <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">aux</span>.<span class="ruby-identifier">nil?</span>
83:       <span class="ruby-identifier">$lista_desenv</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-ivar">@desenv</span>.<span class="ruby-identifier">id</span>.<span class="ruby-identifier">to_i</span>
84:     <span class="ruby-keyword kw">end</span>
85:     <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">$lista_desenv</span>.<span class="ruby-identifier">empty?</span>
86:       <span class="ruby-ivar">@desenv</span> = <span class="ruby-constant">Desenvolvedor</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">params</span>[<span class="ruby-identifier">:desenvolvedor</span>][<span class="ruby-identifier">:id</span>])
87:       <span class="ruby-identifier">$lista_desenv</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-ivar">@desenv</span>.<span class="ruby-identifier">id</span>.<span class="ruby-identifier">to_i</span>
88:     <span class="ruby-keyword kw">end</span>      
89:   <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000156" class="method-detail">
        <a name="M000156"></a>

        <div class="method-heading">
          <a href="#M000156" class="method-signature">
          <span class="method-name">aprovarDesenvolvimento</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000156-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000156-source">
<pre>
     <span class="ruby-comment cmt"># File app/controllers/pool_controller.rb, line 113</span>
113:   <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">aprovarDesenvolvimento</span>
114:     <span class="ruby-identifier">historico</span> = <span class="ruby-constant">Historico</span>.<span class="ruby-identifier">new</span>
115:     <span class="ruby-identifier">historico</span>.<span class="ruby-identifier">attributes</span> = <span class="ruby-identifier">params</span>[<span class="ruby-identifier">:historico</span>]
116:     <span class="ruby-identifier">historico</span>.<span class="ruby-identifier">usuario_id</span> = <span class="ruby-constant">Goldberg</span>.<span class="ruby-identifier">user</span>.<span class="ruby-identifier">id</span>
117:     <span class="ruby-ivar">@requisicao</span> = <span class="ruby-constant">Requisicao</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">historico</span>.<span class="ruby-identifier">requisicao_id</span>)
118:     <span class="ruby-ivar">@requisicao</span>.<span class="ruby-identifier">aprovarDesenvolvimento!</span>
119:     <span class="ruby-identifier">historico</span>.<span class="ruby-identifier">estado</span> = <span class="ruby-ivar">@requisicao</span>.<span class="ruby-identifier">estado</span>
120:     <span class="ruby-ivar">@requisicao</span>.<span class="ruby-identifier">historicos</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">historico</span>
121:     <span class="ruby-identifier">flash</span>[<span class="ruby-identifier">:notice</span>] = <span class="ruby-value str">'Operação realizada com sucesso.'</span>        
122:     <span class="ruby-identifier">redirect_to</span> <span class="ruby-identifier">:action</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'home'</span>
123:   <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000155" class="method-detail">
        <a name="M000155"></a>

        <div class="method-heading">
          <a href="#M000155" class="method-signature">
          <span class="method-name">del_certificador</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000155-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000155-source">
<pre>
     <span class="ruby-comment cmt"># File app/controllers/pool_controller.rb, line 97</span>
 97:   <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">del_certificador</span>
 98:     <span class="ruby-identifier">aux</span> = []
 99:     <span class="ruby-keyword kw">for</span> <span class="ruby-identifier">i</span> <span class="ruby-keyword kw">in</span> <span class="ruby-identifier">$lista_desenv</span>
100:       <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">i</span> <span class="ruby-operator">!=</span> <span class="ruby-identifier">params</span>[<span class="ruby-identifier">:id</span>].<span class="ruby-identifier">to_i</span>
101:         <span class="ruby-identifier">aux</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">i</span>.<span class="ruby-identifier">to_i</span>
102:       <span class="ruby-keyword kw">end</span>
103:     <span class="ruby-keyword kw">end</span>
104:     <span class="ruby-identifier">$lista_desenv</span> = <span class="ruby-identifier">aux</span>
105:     <span class="ruby-ivar">@desenv</span> = <span class="ruby-constant">Desenvolvedor</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">params</span>[<span class="ruby-identifier">:id</span>])
106:     <span class="ruby-comment cmt">#      @requisicao = Requisicao.find(params[:req_id])</span>
107:     <span class="ruby-comment cmt">#      @requisicao.desenvolvedores.delete(@desenv)</span>
108:     <span class="ruby-identifier">render</span> <span class="ruby-identifier">:update</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">page</span><span class="ruby-operator">|</span>
109:       <span class="ruby-identifier">page</span>.<span class="ruby-identifier">remove</span>(<span class="ruby-ivar">@desenv</span>.<span class="ruby-identifier">dom_id</span>)
110:     <span class="ruby-keyword kw">end</span>
111:   <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000154" class="method-detail">
        <a name="M000154"></a>

        <div class="method-heading">
          <a href="#M000154" class="method-signature">
          <span class="method-name">del_desenv</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000154-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000154-source">
<pre>
    <span class="ruby-comment cmt"># File app/controllers/pool_controller.rb, line 90</span>
90:   <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">del_desenv</span>
91:     <span class="ruby-ivar">@requisicao</span> = <span class="ruby-constant">Requisicao</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">params</span>[<span class="ruby-identifier">:requisicao</span>])
92:     <span class="ruby-ivar">@requisicao</span>.<span class="ruby-identifier">desenvolvedores</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-constant">Desenvolvedor</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">params</span>[<span class="ruby-identifier">:id</span>]))
93:     <span class="ruby-identifier">render</span> <span class="ruby-identifier">:update</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">page</span><span class="ruby-operator">|</span>
94:       <span class="ruby-identifier">page</span>.<span class="ruby-identifier">remove</span>(<span class="ruby-identifier">params</span>[<span class="ruby-identifier">:id</span>])
95:     <span class="ruby-keyword kw">end</span>
96:   <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000152" class="method-detail">
        <a name="M000152"></a>

        <div class="method-heading">
          <a href="#M000152" class="method-signature">
          <span class="method-name">escalarDesenvolvedor</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000152-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000152-source">
<pre>
    <span class="ruby-comment cmt"># File app/controllers/pool_controller.rb, line 46</span>
46:   <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">escalarDesenvolvedor</span>
47:     <span class="ruby-identifier">msg</span> = <span class="ruby-value str">''</span>
48:     <span class="ruby-ivar">@requisicao</span> = <span class="ruby-constant">Requisicao</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">params</span>[<span class="ruby-identifier">:id</span>])
49:     <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">$lista_desenv</span>.<span class="ruby-identifier">empty?</span>
50:       <span class="ruby-keyword kw">for</span> <span class="ruby-identifier">i</span> <span class="ruby-keyword kw">in</span> <span class="ruby-identifier">$lista_desenv</span>
51:         <span class="ruby-ivar">@requisicao</span>.<span class="ruby-identifier">desenvolvedores</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-constant">Desenvolvedor</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">i</span>)
52:       <span class="ruby-keyword kw">end</span>
53:     <span class="ruby-keyword kw">for</span> <span class="ruby-identifier">desenv</span> <span class="ruby-keyword kw">in</span> <span class="ruby-ivar">@requisicao</span>.<span class="ruby-identifier">desenvolvedores</span> 
54:       <span class="ruby-identifier">msg</span> = <span class="ruby-identifier">msg</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">desenv</span>.<span class="ruby-identifier">fullname</span> <span class="ruby-operator">+</span> <span class="ruby-value str">'; '</span>
55:     <span class="ruby-keyword kw">end</span>
56:     <span class="ruby-ivar">@requisicao</span>.<span class="ruby-identifier">escalarDesenvolvedor!</span>  
57:     <span class="ruby-identifier">historico</span> = <span class="ruby-constant">Historico</span>.<span class="ruby-identifier">new</span>
58:     <span class="ruby-identifier">historico</span>.<span class="ruby-identifier">observacao</span> = <span class="ruby-value str">'Mensagem Padrão - Desenvolvedores: '</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">msg</span>
59:     <span class="ruby-identifier">historico</span>.<span class="ruby-identifier">usuario_id</span> = <span class="ruby-constant">Goldberg</span>.<span class="ruby-identifier">user</span>.<span class="ruby-identifier">id</span>
60:     <span class="ruby-identifier">historico</span>.<span class="ruby-identifier">estado</span> = <span class="ruby-ivar">@requisicao</span>.<span class="ruby-identifier">estado</span>
61:     <span class="ruby-ivar">@requisicao</span>.<span class="ruby-identifier">historicos</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">historico</span>       
62:     <span class="ruby-identifier">redirect_to</span> <span class="ruby-identifier">:action</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">&quot;home&quot;</span>
63:   <span class="ruby-keyword kw">else</span>
64:     <span class="ruby-identifier">flash</span>[<span class="ruby-identifier">:notice</span>] = <span class="ruby-value str">'Adicione pelomenos um desenvolvedor'</span>
65:     <span class="ruby-identifier">redirect_to</span> <span class="ruby-identifier">:controller</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">&quot;requisicoes&quot;</span>, <span class="ruby-identifier">:action</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">&quot;escalarDesenvolvedor_tela&quot;</span>, <span class="ruby-identifier">:id</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-ivar">@requisicao</span>
66:   <span class="ruby-keyword kw">end</span> 
67:     
68:   <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000148" class="method-detail">
        <a name="M000148"></a>

        <div class="method-heading">
          <a href="#M000148" class="method-signature">
          <span class="method-name">home</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000148-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000148-source">
<pre>
    <span class="ruby-comment cmt"># File app/controllers/pool_controller.rb, line 20</span>
20:   <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">home</span>
21:     <span class="ruby-ivar">@requisicao_pages</span>, <span class="ruby-ivar">@requisicoes</span> = <span class="ruby-identifier">paginate</span>(<span class="ruby-identifier">:requisicoes</span>, <span class="ruby-identifier">:per_page</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value">10</span>, <span class="ruby-identifier">:conditions</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">&quot;estado = 'aguardandoDesenvolvimento' or estado = 'desenvolvimentoConcluido' or estado = 'desenvolvimentoReprovadoPool'&quot;</span>)
22:   <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000146" class="method-detail">
        <a name="M000146"></a>

        <div class="method-heading">
          <a href="#M000146" class="method-signature">
          <span class="method-name">index</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000146-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000146-source">
<pre>
   <span class="ruby-comment cmt"># File app/controllers/pool_controller.rb, line 2</span>
2:   <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">index</span>
3:     <span class="ruby-identifier">home</span>
4:     <span class="ruby-identifier">render</span> <span class="ruby-identifier">:action</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'home'</span>
5:   <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000151" class="method-detail">
        <a name="M000151"></a>

        <div class="method-heading">
          <a href="#M000151" class="method-signature">
          <span class="method-name">minhas_req</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000151-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000151-source">
<pre>
    <span class="ruby-comment cmt"># File app/controllers/pool_controller.rb, line 33</span>
33:   <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">minhas_req</span>
34:   <span class="ruby-identifier">sql</span> = <span class="ruby-node">&quot;SELECT r.id, r.descricao, r.created_at, r.estado
35:           FROM desenvolvedores_requisicoes c, requisicoes r, goldberg_users gu
36:           where gu.id = c.desenvolvedor_id
37:           and c.requisicao_id = r.id
38:           and gu.id = #{Goldberg.user.id}
39:           and (r.estado = 'escaladaParaDesenvolvedor' 
40:           or r.estado = 'desenvolvimentoSuspenso' 
41:           or r.estado = 'emDesenvolvimento')&quot;</span>
42:           
43:      <span class="ruby-ivar">@requisicao_pages</span>, <span class="ruby-ivar">@requisicoes</span> = <span class="ruby-identifier">paginate_by_sql</span>(<span class="ruby-constant">Requisicao</span>, <span class="ruby-identifier">sql</span>, <span class="ruby-value">7</span>)
44:   <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000157" class="method-detail">
        <a name="M000157"></a>

        <div class="method-heading">
          <a href="#M000157" class="method-signature">
          <span class="method-name">reprovarDesenvolvimento</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000157-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000157-source">
<pre>
     <span class="ruby-comment cmt"># File app/controllers/pool_controller.rb, line 125</span>
125:   <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">reprovarDesenvolvimento</span>
126:     <span class="ruby-identifier">historico</span> = <span class="ruby-constant">Historico</span>.<span class="ruby-identifier">new</span>
127:     <span class="ruby-identifier">historico</span>.<span class="ruby-identifier">attributes</span> = <span class="ruby-identifier">params</span>[<span class="ruby-identifier">:historico</span>]
128:     <span class="ruby-identifier">historico</span>.<span class="ruby-identifier">usuario_id</span> = <span class="ruby-constant">Goldberg</span>.<span class="ruby-identifier">user</span>.<span class="ruby-identifier">id</span>
129:     <span class="ruby-ivar">@requisicao</span> = <span class="ruby-constant">Requisicao</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">historico</span>.<span class="ruby-identifier">requisicao_id</span>)
130:     <span class="ruby-ivar">@requisicao</span>.<span class="ruby-identifier">reprovarDesenvolvimento!</span>
131:     <span class="ruby-identifier">historico</span>.<span class="ruby-identifier">estado</span> = <span class="ruby-ivar">@requisicao</span>.<span class="ruby-identifier">estado</span>
132:     <span class="ruby-ivar">@requisicao</span>.<span class="ruby-identifier">historicos</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">historico</span>
133:     <span class="ruby-identifier">flash</span>[<span class="ruby-identifier">:notice</span>] = <span class="ruby-value str">'Operação realizada com sucesso.'</span>        
134:     <span class="ruby-identifier">redirect_to</span> <span class="ruby-identifier">:action</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'home'</span>
135:   <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000149" class="method-detail">
        <a name="M000149"></a>

        <div class="method-heading">
          <a href="#M000149" class="method-signature">
          <span class="method-name">req_em_desenv</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000149-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000149-source">
<pre>
    <span class="ruby-comment cmt"># File app/controllers/pool_controller.rb, line 24</span>
24:   <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">req_em_desenv</span>
25:     <span class="ruby-ivar">@requisicao_pages</span>, <span class="ruby-ivar">@requisicoes</span> = <span class="ruby-identifier">paginate</span>(<span class="ruby-identifier">:requisicoes</span>, <span class="ruby-identifier">:per_page</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value">10</span>, <span class="ruby-identifier">:conditions</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">&quot;estado = 'emDesenvolvimento' or  estado = 'escaladaParaDesenvolvedor' or estado = 'desenvolvimentoReprovadoAnal' or estado = 'desenvolvimentoReprovadoPool'&quot;</span>)     
26:   <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000147" class="method-detail">
        <a name="M000147"></a>

        <div class="method-heading">
          <a href="#M000147" class="method-signature">
          <span class="method-name">show</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000147-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000147-source">
<pre>
    <span class="ruby-comment cmt"># File app/controllers/pool_controller.rb, line 10</span>
10:   <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">show</span>
11:     <span class="ruby-ivar">@requisicao</span> = <span class="ruby-constant">Requisicao</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">params</span>[<span class="ruby-identifier">:id</span>])
12:     <span class="ruby-ivar">@events</span> = <span class="ruby-identifier">filtra_eventos</span>(<span class="ruby-ivar">@requisicao</span>.<span class="ruby-identifier">next_events_for_current_state</span>)
13:     <span class="ruby-ivar">@programadores</span> = <span class="ruby-constant">Desenvolvedor</span>.<span class="ruby-identifier">find_by_sql</span>(<span class="ruby-node">&quot;select t.id, t.name
14:                                 from goldberg_users t, desenvolvedores_requisicoes dr, requisicoes r
15:                                 where t.id = dr.desenvolvedor_id
16:                                 and dr.requisicao_id = r.id
17:                                 and r.id = #{params[:id]}&quot;</span>)
18:   <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000150" class="method-detail">
        <a name="M000150"></a>

        <div class="method-heading">
          <a href="#M000150" class="method-signature">
          <span class="method-name">show_req</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000150-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000150-source">
<pre>
    <span class="ruby-comment cmt"># File app/controllers/pool_controller.rb, line 28</span>
28:   <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">show_req</span>
29:     <span class="ruby-ivar">@requisicao</span> = <span class="ruby-constant">Requisicao</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">params</span>[<span class="ruby-identifier">:id</span>])
30:     <span class="ruby-ivar">@events</span> = <span class="ruby-identifier">filtra_eventos</span>(<span class="ruby-ivar">@requisicao</span>.<span class="ruby-identifier">next_events_for_current_state</span>)
31:   <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>


    </div>


  </div>


<div id="validator-badges">
  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>

</body>
</html>